package com.zhiyou.books.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zhiyou.books.pojo.Email;
import com.zhiyou.books.service.EmailService;

import java.util.List;

@RestController
@RequestMapping(value = "/email")
public class EmailController {
    @Autowired
    EmailService emailService;
    @RequestMapping(value = "/getEmail")
    public List<Email> getEmail(){
        System.out.println("getEmail============");
        return  emailService.getAll();
    }
}
